/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session04;

import java.util.Arrays;

/**
 *
 * @author macbookpro
 */
public class ArraysTest {
    public static void main(String[] args) {
        Student list[] = new Student[3];
        
        list[0] = new Student("R00003", "abc");
        list[1] = new Student("R00001", "124");
        list[2] = new Student("R00002", "xyz");
        
        //Arrays.sort(list);
        
        //Sap xep theo ten
        Arrays.sort(list, new StudentSortByName());
        
        for(int i=0; i<list.length; i++){
            System.out.println(list[i]);
        }
    }
}
